import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'
import Card from '@/components/Card'
import login from '@/view/login'
import mycharts2 from '@/components/mycharts2'
import personal from '@/view/personal'
import index from '@/view/index'
import main from '@/view/main'
import grxx from '@/view/grxx'
import management from '@/view/management'   
Vue.use(Router)

export default new Router({
  routes: [{
      path: '/',
      name: 'login',
      component: login
    },
    {
      path: '/HelloWorld',
      name: 'HelloWorld',
      component: HelloWorld
    },
    {
      path: '/Card',
      name: 'Card',
      component: Card
    },
    {
      path: '/index',
      name: 'index',
      component: index,
      children: [{
      path: '/main',
      name: 'main',
      component: main,
      children:[{
        path: '/personal',
        name: 'personal',
        component: personal
      }]
    },
    {
      path: '/management',
      name: '/management',
      component: management
    },
    {
      path: '/mycharts2',
      name: 'mycharts2',
      component: mycharts2,
      children: [{
        path: '/personal',
        name: 'personal',
        component: personal
      }]
    }]
    }

  ]
})
